Technical Q&A
FL 13 - PBLockRange with a zero-length range
(22-November-99)
Q Why do I keep getting the afpRangeOverlap (-5021)
error although the file is not ranged-locked?
A The most likely culprit might be that you are
doing a range-lock/unlocked-wrapped PBWrite() with a length
determined programmatically. If this computed length happens
to be zero at a specific offset, then any further attempt to
call PBLockRange which would include that offset will return
the afpRangeOverlap error.
This is a known bug [2295724] which has yet to be
fixed. A valid, now and in the future, workaround is to
simply test the computed length against zero and to not call
the sequence in that case.
-- Eric Simenel
Worldwide Developer Technical Support
Technical Q&As | Contents
Previous Question
To contact us, please use the Contact
Us page.
|